<template>
	<div class="moudle">
		<div class="right_header" :style='{"background":this.$store.getters.theme[5]}'>
			<div class="listName" :style='{"color":this.$store.getters.theme[6]}'> <i class="icon iconfont">&#xe7d8;</i>
				当前位置/授权管理/
				<span>页面管理</span>
			</div>
		</div>
		<div class="right_content">
			<el-button type="primary" @click="moudleShowFun()">
				<i class="el-icon-edit"></i>&nbsp
				添加模块
			</el-button>
			<el-tree
			  :data="data2"
			  :props="defaultProps"
			  node-key="name"
			  @node-expand = "expand"
			  :default-expanded-keys= 'defaultExpanded'
			  :expand-on-click-node="false"
			  :render-content="renderContent">
			</el-tree>
		</div>
		<div class="moudleshade" v-show="moudleShow">
			<div class="moudleChoose">
				<div class="vicp-close"  @click="moudleShow=false"> <i class="el-icon-close vicp-icon4"></i>
				</div>
				<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
					<h5>添加模块</h5>
					<el-form-item label="模块ID" prop="moudleId">
						<el-input v-model.number="ruleForm.moudleId"></el-input>
					</el-form-item>
					<!-- <el-form-item label="模块标识" prop="moudleFunc">
						<el-input v-model="ruleForm.moudleFunc"></el-input>
					</el-form-item> -->
					<el-form-item label="模块名称" prop="moudleName">
						<el-input v-model="ruleForm.moudleName"></el-input>
					</el-form-item>
					<el-form-item label="模块描述" prop="moudleIntro">
						<el-input type="textarea" v-model="ruleForm.moudleIntro"></el-input>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
						<el-button @click="resetForm('ruleForm')">重置</el-button>
					</el-form-item>
				</el-form>
			</div>
		</div>
		<div class="pageshade" v-show="pageShow">
			<div class="pageChoose">
				<div class="vicp-close"  @click="pageShow=false"> <i class="el-icon-close vicp-icon4"></i>
				</div>
				<el-form :model="pageForm" :rules="pages" ref="pageForm" label-width="100px" class="demo-ruleForm">
					<h5>添加页面</h5>
					<el-form-item label="父级模块" prop="parentNode">
						<p>{{pageForm.modelId}}</p>
					</el-form-item>
					<el-form-item label="页面ID" prop="id">
						<el-input v-model.number="pageForm.id"></el-input>
					</el-form-item>
					<!-- <el-form-item label="页面标识" prop="pageFunc">
						<el-input v-model="pageForm.pageFunc"></el-input>
					</el-form-item> -->
					<el-form-item label="页面名称" prop="name">
						<el-input v-model="pageForm.name"></el-input>
					</el-form-item>
					<el-form-item label="页面SRC">
						<el-input v-model="pageForm.src"></el-input>
					</el-form-item>
					<el-form-item label="页面描述">
						<el-input type="textarea" v-model="pageForm.description"></el-input>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" @click="pageSubmit('pageForm')">立即创建</el-button>
						<el-button @click="resetPage('pageForm')">重置</el-button>
					</el-form-item>
				</el-form>
			</div>
		</div>
		<div class="revampshade" v-show="revampShow">
			<div class="revampChoose">
				<div class="vicp-close"  @click="revampShow=false"> <i class="el-icon-close vicp-icon4"></i>
				</div>
				<el-form :model="revampForm" :rules="revampRules" ref="revampForm" label-width="100px" class="demo-ruleForm">
					<h5>{{revampForm.revampPage===true?"修改页面":"修改模块"}}</h5>
					<el-form-item label="父模块ID" prop="revampModelId" v-show="revampForm.revampPage">
						<p>{{revampForm.revampModelId}}</p>
					</el-form-item>
					<el-form-item :label="revampForm.revampPage===true?'页面ID':'模块ID'" prop="revampId">
						<el-input v-model.number="revampForm.revampId"></el-input>
					</el-form-item>
					<!-- <el-form-item :label="revampForm.revampId>1000?'页面标识':'模块标识'" prop="revampFunc">
						<el-input v-model="revampForm.revampFunc"></el-input>
					</el-form-item> -->
					<el-form-item :label="revampForm.revampPage===true?'页面名称':'模块名称'" prop="revampName">
						<el-input v-model="revampForm.revampName"></el-input>
					</el-form-item>
					<el-form-item label="页面SRC" v-show="revampForm.revampPage">
						<el-input v-model="revampForm.revampSrc"></el-input>
					</el-form-item>
					<el-form-item :label="revampForm.revampPage===true?'页面描述':'模块描述'" prop="moudleIntro">
						<el-input type="textarea" v-model="revampForm.revampIntro"></el-input>
					</el-form-item>
					<el-form-item>
						<el-button type="primary" @click="revampSubmit('revampForm')">立即修改</el-button>
						<el-button @click="resetRevamp('revampForm')">重置</el-button>
					</el-form-item>
				</el-form>
			</div>
		</div>
	</div>

</template>
<style lang="stylus" rel="stylesheet/stylus" src="./moudle.styl"></style>
<script src="./moudle.js"></script>